﻿using MG.Repository;
using SqlSugar;

namespace MG.SmartHMI.Entity.DAO
{
    /// <summary>
    /// Modbus配置信息
    /// </summary>
    [SugarTable("sys_modbusinfo")]
    public class ModbusInfo : BaseEntity
    {
        public bool EnableRtu { get; set; } = true;
        public string Station { get; set; } = "1";

        public int DataFormat { get; set; } = 0;
        public bool FirstStrFrom0 { get; set; } = false;
        public bool StrResever { get; set; } = false;
        public int ConnectTimeOut { get; set; } = 1000;
        public int TimeInterVal { get; set; } = 50;

        #region serial port inf

        public string PortName { get; set; }

        public int BaudRate { get; set; } = 115200;

        public int DataBits { get; set; } = 1;

        public int StopBits { get; set; }

        public int Parity { get; set; }

        #endregion serial port inf

        #region tcp inf

        public string IP { get; set; } = "127.0.0.1";

        public int Port { get; set; } = 502;

        #endregion tcp inf
    }
}